package com.zks.example;

import com.zks.MyServer;
import com.zks.action.Action;
import com.zks.handler.Request;
import com.zks.handler.Response;
import com.zks.setting.Setting;

public class ExampleAction implements Action{

    @Override
    public void doAction(Request request, Response response) {
        String a = String.valueOf(request.getParam("a"));
        response.setContent("response a: " + a);
        //throw new RuntimeException("Test");
    }

    public static void main(String[] args) throws Exception{
        Setting.setAction("/example",ExampleAction.class);
        Setting.setPort(8090);
        MyServer.start();
    }
}
